﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using DataAnnotationsExtensions;

namespace HomeStayWebCP.Models.BusinessObject
{
    public class MailObject
    {
        [Required(ErrorMessage = "Name is required")]
        [StringLength(100,ErrorMessage="Name must be under 100 characters.")]
        public string Sender { get; set; }
        [RegularExpression("^[0-9]{9,15}$", ErrorMessage = "Phone must be number 9-15 digits.")]
        public string SenderPhone { get; set; }
        [Required(ErrorMessage = "Email is required")]
        [Email(ErrorMessage = "Email must follow format abc@abc.com")]
        public string SenderEmail { get; set; }
        [Required(ErrorMessage = "Please write your message!")]
        public string Content { get; set; }
        public string ContactEmail { get; set; }
        public string PostTitle { get; set; }

    }
}